package com.code.day10;

public class Test02 {
    public static void main(String[] args) {
        /*
           int a = 10;
           double b = a
           b = 10L;

         */
        /*Animal animal = new Dog();
        animal.eat();
        animal = new Cat();
        animal.eat();*/

        Dog dog = new Dog();
        method(dog);

        Cat cat = new Cat();
        method(cat);

        Animal animal = new Dog();
        Animal animal1 = new Cat();
        animal.eat();
        method(animal);
        method1(animal1);
    }

    public static void method(Animal animal){//Animal animal = dog   Animal animal = cat
        animal.eat();
    }
    public static void method1(Animal  animal){
        animal.eat();
    }
}
